package org.example.controller;

import com.github.pagehelper.PageInfo;
import org.example.entity.PubCenter;
import org.example.service.PubCenterService;
import org.example.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName PubCenterController
 * @Description TODO
 * @Author lipeijin
 * @Date 2025年08月14日 下午7:57
 * @Version 1.0
 */
@RestController
@RequestMapping("PubCenter")
public class PubCenterController {
    @Autowired
    private PubCenterService pubCenterService;
    @GetMapping
    public R getPage(@RequestParam(required = false,defaultValue = "1") int pageNum,
                     @RequestParam(required = false,defaultValue = "10") int PageSize){
        PageInfo<PubCenter> pageInfo = pubCenterService.getPage(pageNum, PageSize);
        return R.ok(pageInfo);
    }


}
